package com.cpi.cornpp.common.files.dto;
/**
 * Corn Factor Data Access Object
 * @author Edgar Joao
 * @see SAPComponentDTO
 */
public class SAPComponentCornFactorDTO implements SAPComponentDTO {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6216696433390911540L;
	private String plant;
	private String material;
	private int  fiscalYear;
	private int period;
	private double cornEquivalence;
	private double productMT;
	private double grind;
	private double factor;
	
	public boolean equals(Object object) {
		boolean equal = false;
		SAPComponentCornFactorDTO sapComponentCornFactorDTO = null;
		if( this == object){
			equal = true;
		}else{
			if( this instanceof SAPComponentCornFactorDTO ){
				sapComponentCornFactorDTO = (SAPComponentCornFactorDTO) object;
				if( this.hashCode()  == sapComponentCornFactorDTO.hashCode() ){
					equal = true;
				}
			}
		}		
		return equal;
	}	
	public int hashCode() {
		int hash = 0;
		hash =  ( this.plant != null ? this.plant.hashCode() : 0 );
		hash += ( this.material != null ? this.material.hashCode() : 0 );
		hash += new Integer(this.fiscalYear).hashCode();
		hash += new Integer(this.period).hashCode();
		hash += new Double(cornEquivalence).hashCode();
		hash += new Double(productMT).hashCode();
		hash += new Double(grind).hashCode();
		hash += new Double(factor).hashCode();		
		return hash;
	}	
	public String toString() {
		StringBuffer toStringValue = null;
		toStringValue = new StringBuffer(0);
		toStringValue.append(getClass().getName());
		toStringValue.append(STRING_COLON);
		toStringValue.append(this.plant);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.material);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.fiscalYear);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.period);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.cornEquivalence);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.productMT);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.grind);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.factor);
		toStringValue.append(STRING_COLON);		
		return toStringValue.toString();
	}	
	public String getPlant() {
		return plant;
	}
	public void setPlant(String argPlant) {
		plant = argPlant;
	}
	public String getMaterial() {
		return material;
	}
	public void setMaterial(String argMaterial) {
		material = argMaterial;
	}
	public int getFiscalYear() {
		return fiscalYear;
	}
	public void setFiscalYear(int argFiscalYear) {
		fiscalYear = argFiscalYear;
	}
	public int getPeriod() {
		return period;
	}
	public void setPeriod(int argPeriod) {
		period = argPeriod;
	}
	public double getCornEquivalence() {
		return cornEquivalence;
	}
	public void setCornEquivalence(double argCornEquivalence) {
		cornEquivalence = argCornEquivalence;
	}
	public double getProductMT() {
		return productMT;
	}
	public void setProductMT(double argProductMT) {
		productMT = argProductMT;
	}
	public double getGrind() {
		return grind;
	}
	public void setGrind(double argGrind) {
		grind = argGrind;
	}
	public double getFactor() {
		return factor;
	}
	public void setFactor(double argFactor) {
		factor = argFactor;
	}	
		
}
